
<template>
  <div class="view_head">

    <el-breadcrumb separator="/">
      <el-breadcrumb-item>
        <i :class="$store.state.menuColl?'el-icon-s-unfold':'el-icon-s-fold'"
           @click="Menu"></i>
      </el-breadcrumb-item>
      <el-breadcrumb-item :to="{ path: '/home' }">首页</el-breadcrumb-item>
      <el-breadcrumb-item v-for="(item,index) in breadData"
                          :key="index"><a>{{item}}</a></el-breadcrumb-item>

    </el-breadcrumb>
  </div>
</template>

<script>
import { mapMutations, mapState } from 'vuex'
export default {
  name: 'Ljfvue2011Breadcrumb',

  data () {
    return {

    };
  },

  mounted () {

  },
  computed: {
    ...mapState(["breadData"]),
  },
  methods: {
    ...mapMutations(["changeMenu"]),
    Menu () {
      console.log(1111)
      if (this.$store.state.menuColl) {
        this.changeMenu(false)
      } else {
        this.changeMenu(true)
      }
    }
  },
};
</script>

<style lang="less" >
.view_head {
  height: 50px;
  background: #ccc;
  .el-breadcrumb__item {
    line-height: 50px;
    font-size: 25px;
  }
}
</style>